package com.agent.repository;

import com.agent.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface UserMapper {

    List<User> findOne(Map<String,String> map);

    int insert(List<User> users);

    List<User> list(User user);
    List<User> findByRole();
    List<User> listByAllocation(User user);

    List<User> findByEmail(@Param("email") String email);

    List<User> findLikeByEmail(@Param("email") String email);

    int deleteByCreator();

    int delete(String id);

    int update(User user);

    int saveOrUpdate(User user);

}
